home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Networking / MacTCP / MPing 1.1 / Sources / MPingGlobals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-09-30  |  3.5 KB  |  137 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2. #    MPing 1.1 - MacTCP Ping Tool
  3. #
  4. #    Copyright © Apple Computer, Inc. 1990-1991
  5. #    All rights reserved.
  6. #
  7. #    Versions:    
  8. #                1.1        September 25, 1991.
  9. #
  10. #    File:
  11. #                MPing.c
  12. #
  13. #    Components:
  14. #                AddressXlation.h
  15. #                MacTCPCommonTypes.h
  16. #                Makefile
  17. #                MiscIPPB.h
  18. #                MPing.c
  19. #                MPing.h
  20. #                MPing.r
  21. #                MPingDlg.c
  22. #                MPingExtern.h
  23. #                MPingGlobals.h
  24. #                MPingIcmp.c
  25. #                MPingWindow.c
  26. #                resolver.c
  27. ------------------------------------------------------------------------------*/
  28.  
  29. #define PINGGO_BUTTON        1
  30. #define PINGSTOP_BUTTON        2
  31. #define QUIT_BUTTON            3
  32. #define HOSTADDR_EDIT        5
  33. #define SENDTEXT_RADIO        6
  34. #define SENDTEXT_EDIT        7
  35. #define SENDPATTERN_RADIO    8
  36. #define SENDPATTERN_EDIT    9
  37. #define PACKETSIZE_EDIT        11
  38. #define QUIET_RADIO            13
  39. #define VERBOSE_RADIO        14
  40. #define NOOFPKTS_CHECK        15
  41. #define NOOFPKTS_EDIT        16
  42. #define WAITSEC_EDIT        19
  43.  
  44. #define    MAX_IOPB_QUEUE        60
  45. #define    MAX_OPT_SIZE        40
  46. #define    ICMP_TIME_DELAY        60
  47. #define    ICMP_TIME_WAKEUP    0
  48. #define MIN_TIME_DELAY        1
  49. #define WARP_SPEED            1
  50. #define    DEFAULT_ICMP_SIZE    56
  51. #define MAX_ICMP_SIZE        5000
  52. #define MAX_IP_OPT_LEN        50
  53. #define MAX_PKT_NO_RESP        50
  54. #define DEFAULT_PKT_COUNT    5
  55. #define    MASK_HIGH            0xF0
  56. #define    MASK_LOW            0x0F
  57.  
  58. /* the ipoptns structure defines the format of individual IP options
  59.    within the ip4 header */
  60.  
  61. #define IPO_EOL         0               /* end of options list */
  62. #define IPO_NOP         1               /* ip "nop" option */
  63. #define IPO_SEC         130             /* security option */
  64. #define IPO_LSRR        131             /* loose source & record route */
  65. #define IPO_SSRR        137             /* strict source & record route */
  66. #define IPO_RR          7               /* record route option */
  67. #define IPO_SID         136             /* stream ID option */
  68. #define IPO_TIME        68              /* internet timestamp option */
  69.  
  70.  
  71. typedef struct {
  72.     DialogRecord    pingdialog;
  73.     TEHandle        docTE;
  74.     ControlHandle    docVScroll;
  75.     ProcPtr            docClik;
  76. } DocumentRecord, *DocumentPeek;
  77.  
  78. struct PingStatistics {
  79.     unsigned long    minTime;            /* minimum round trip time */
  80.     unsigned long    avgTime;            /* average round trip time */
  81.     unsigned long    maxTime;            /* maximum round trip time */
  82.     unsigned long    totTime;            /* sum of round trip time of all icmp packets received */
  83.     long    totPktOut;                    /* no of icmp requests sent */
  84.     long    totPktIn;                    /* no of icmp replies received */
  85.     long    totPktBad;                    /* no of bad icmp replies */
  86.     long    pktLoss;                    /* percentage packet loss */
  87. };
  88.  
  89. struct Record_Route_Info {                /* includes RR, LSRR and SSRR */
  90.     b_8        opt_type;
  91.     b_8        opt_len;
  92.     b_8        opt_ptr;
  93.     b_32    route_1;
  94.     b_32    route_2;
  95.     b_32    route_3;
  96.     b_32    route_4;
  97.     b_32    route_5;
  98. };
  99.  
  100. struct Security_Info {
  101.     b_8        opt_type;
  102.     b_8        opt_len;
  103.     b_16    Security_SS;
  104.     b_16    Compartments_CC;
  105.     b_16    HandlingRestrictions_HH;
  106.     b_16    TCC_1;                /* first 16 2 bytes of Transimission Control Code */
  107.     b_8        TCC_2;                /* 3rd byte of TCC */
  108. };
  109.  
  110. struct Stream_Indentifier_Info {
  111.     b_8        opt_type;
  112.     b_8        opt_len;
  113.     b_16    stream_id;
  114. };
  115.  
  116. struct Internet_Timestamp_Info {
  117.     b_8        opt_type;
  118.     b_8        opt_len;
  119.     b_8        opt_ptr;
  120.     b_8        oflwflag;
  121.     b_32    ipAddr_TS1;
  122.     b_32    time_stamp2;
  123.     b_32    ipAddr_TS3;
  124.     b_32    time_stamp4;
  125.     b_32    ipAddr_TS5;
  126.     b_32    time_stamp6;
  127.     b_32    ipAddr_TS7;
  128.     b_32    time_stamp8;
  129. };
  130.  
  131. struct EchoResponseStatus {
  132.     unsigned long     pkt_no;                /* resonse number */
  133.     unsigned long    rt_time;            /* round trip time */
  134.     unsigned short    pkt_len;            /* response length */
  135.     Boolean response_ok;                /* true of success, else false */
  136. };
  137.